this._workspaces.setHighlightWindow(metaWindow);
},
+
/**
- * setWindowApplicationFilter:
- * @id: A string application identifier
+ * beginApplicationWindowSelection:
+ * @appid: Application identifier string
*
- * Hide all windows which are not owned by the application
- * identified by @id.
+ * Enter a mode which shows only the widnows owned by the
+ * given application, and allow highlighting of a specific
+ * window with setHighlightWindow().
*/
- setWindowApplicationFilter: function (id) {
+ beginApplicationWindowSelection: function (appid) {
if (this._workspaces)
- this._workspaces.setWindowApplicationFilter(id);
+ this._workspaces.beginApplicationWindowSelection(appid);
},
//// Private methods ////
this._inDrag = false;
},
- setHighlighted: function (highlighted) {
- let factor = 0.1;
- if (highlighted) {
- this.actor.scale_x += factor;
- this.actor.scale_y += factor;
- } else {
- this.actor.scale_x -= factor;
- this.actor.scale_y -= factor;
- }
- },
-
setVisibleWithChrome: function(visible) {
if (visible) {
this.actor.show();
this.positionWindows(false);
},
+ /**
+ * setLightboxMode:
+ * @showLightbox: If true, dim background and allow highlighting a specific window
+ *
+ * This function also resets the highlighted window state.
+ */
setLightboxMode: function (showLightbox) {
- if (showLightbox)
+ if (showLightbox) {
+ this.setHighlightWindow(null);
this._lightbox.show();
- else
+ } else {
this._lightbox.hide();
+ }
},
setHighlightWindow: function (metaWindow) {
// highlighted window while trying to handle the window or workspace possibly
// going away.
for (let i = 0; i < this._workspaces.length; i++) {
- this._workspaces[i].setLightboxMode(metaWindow != null);
this._workspaces[i].setHighlightWindow(null);
}
if (metaWindow != null) {
}
},
- setWindowApplicationFilter: function (appId) {
+ beginApplicationWindowSelection: function (appId) {
let appSys = Shell.AppMonitor.get_default();
let showOnlyWindows;
}
this._appIdFilter = appId;
for (let i = 0; i < this._workspaces.length; i++) {
+ this._workspaces[i].setLightboxMode(showOnlyWindows != null);
this._workspaces[i].setShowOnlyWindows(showOnlyWindows);
}
},